<include file="SpStore:header" />
		<!----《/头部结束》----->
		<div class="ncsc-layout wrapper">
			<include file="SpStore:store_left" />
			  <div id="layoutRight" class="ncsc-layout-right">
    <div class="ncsc-path"><i class="icon-desktop"></i>商家管理中心<i class="icon-angle-right"></i>店铺<i class="icon-angle-right"></i>店铺设置</div>
    <div class="main-content" id="mainContent">
      
<div class="tabmenu">
  <ul class="tab pngFix">
	<li class="active"><a href="javascript:void(0);">店铺设置</a></li>
	<!-- <li class="normal"><a href="">幻灯片设置</a></li>
	<li class="normal"><a href="">店铺主题</a></li>
	<li class="normal"><a href="">手机店铺设置</a></li> -->
	</ul>
</div>
<div class="ncsc-form-default">
  <form method="post" action="/store/on_set.html" enctype="multipart/form-data" id="my_store_form">
    <input type="hidden" name="set_submit" value="ok">
	<input type="hidden" name="set_hash" value="">
	<input type="hidden" name="id" value="{$shop_store.store_id}">
    <dl>
      <dt>店铺等级：</dt>
      <dd>
        <p>{$shop_store.sg_name}</p>
        </dd>
    </dl>
    <dl>
      <dt>店铺名称：</dt>
      <dd>
       <input type="text" value="{$shop_store.store_name}" name="store_name" class="text w400">
        </dd>
    </dl>
    <dl>
      <dt>主营商品：</dt>
      <dd>
          <textarea name="store_zy" rows="2" class="textarea w400" maxlength="50">{$shop_store.store_zy}</textarea>
        <p class="hint">关键字最多可输入50字，请用英文","进行分隔，例如”男装,女装,童装”</p>
      </dd>
    </dl>
    
    <!--v3-b12 -->
<!--      <dl>
      <dt>店铺二维码：</dt>
      <dd>
         <p><img src="__PUBLIC__/Home/images/default_qrcode.png" title="商品原始地"></p>
        <p class="hint">保存后，生成新的二维码</p>
      </dd>
    </dl> -->
    
    
    <dl>
      <dt>店铺logo：</dt>
      <dd>
        <div class="ncsc-upload-thumb store-logo" id="store_label">
          <p>  <if condition="$shop_store.store_label neq ''"><img src="{$shop_store.store_label}" data-ke-src="{$shop_store.store_label}"> <else/><i class="icon-picture"></i></if> 
          </p>
        </div>
        <div class="ncsc-upload-btn"> <a href="javascript:void(0);"><span>
          <input type="file" class="input-file" name="store_label_pic" id="storeLablePic" >
		  <input type="hidden" class="input-file" name="store_label"  value="{$shop_store.store_label}" >
          </span>
          <p><i class="icon-upload-alt"></i>图片上传</p>
          </a> </div>
        <p class="hint">此处理店铺页logo；<br><span style="color:orange;">建议使用宽200像素-高60像素内的GIF或PNG透明图片；点击下方"提交"按钮后生效。</span></p>
      </dd>
    </dl>
    <dl>
      <dt>店铺条幅： </dt>
      <dd>
        <div class="ncsc-upload-thumb store-banner" id="store_banner">
          <p> <if condition="$shop_store.store_banner neq ''"><img src="{$shop_store.store_banner}" data-ke-src="{$shop_store.store_banner}"> <else/><i class="icon-picture"></i></if> 
          </p>
        </div>
        <div class="ncsc-upload-btn"> <a href="javascript:void(0);"><span>
          <input type="file" class="input-file" name="store_banner_pic" id="storeBannerPic" >
		   <input type="hidden" class="input-file" name="store_banner" value="{$shop_store.store_banner}">
          </span>
          <p><i class="icon-upload-alt"></i>图片上传</p>
          </a> </div>
        <p class="hint">此处为店铺页banner导航；<br><span style="color:orange;">建议使用宽1000像素*高250像素的图片；点击下方"提交"按钮后生效。</span></p>
      </dd>
    </dl>
      <dl class="setup store-logo">
        <dt>店铺头像： </dt>
        <dd>
          <p id="store_avatar">         
		  <if condition="$shop_store.store_avatar neq ''"><img src="{$shop_store.store_avatar}" data-ke-src="{$shop_store.store_avatar}"> <else/><i class="icon-picture"></i></if> 
          </p>
        <div class="ncsc-upload-btn"> <a href="javascript:void(0);"><span>
          <input type="file" class="input-file" name="_pic" id="headr_pic" >
		  <input type="hidden" value="" name="store_avatar" value="{$shop_store.store_avatar}">
          </span>
          <p><i class="icon-upload-alt"></i>图片上传</p>
          </a> </div>
          <p class="hint">此处为店铺方形头像；<br><span style="color:orange;">建议使用宽100像素*高100像素内的方型图片；点击下方"提交"按钮后生效。</span></p>
        </dd>
      </dl>
        <dl>
      <dt>QQ：</dt>
      <dd>
        <input class="w200 text" name="store_qq" type="text" id="store_qq" value="{$shop_store.store_qq}">
      </dd>
    </dl>
    <dl>
      <dt>阿里旺旺：</dt>
      <dd>
        <input class="text w200" name="store_ww" type="text" id="store_ww" value="{$shop_store.store_ww}">
      </dd>
    </dl>
    <dl>
      <dt>店铺电话：</dt>
      <dd>
        <input class="text w200" name="store_phone" maxlength="20" type="text" id="store_phone" value="{$shop_store.store_phone}">
      </dd>
    </dl>
    <dl>
      <dt>SEO关键字：</dt>
      <dd>
        <p>
          <input class="text w400" name="seo_keywords" type="text" value="{$shop_store.store_keywords|htmlspecialchars_decode}">
        </p>
        <p class="hint">用于店铺搜索引擎的优化，关键字之间请用英文逗号分隔</p>
      </dd>
    </dl>
    <dl>
      <dt>SEO店铺描述：</dt>
      <dd>
        <p>
          <textarea name="seo_description" rows="3" class="textarea w400" id="remark_input">{$shop_store.store_description|htmlspecialchars_decode}</textarea>
        </p>
        <p class="hint">用于店铺搜索引擎的优化，建议120字以内</p>
      </dd>
    </dl>
    <div class="bottom">
        <label class="submit-border"><input type="submit" class="submit" value="提交"></label>
      </div>
  </form>
</div>
<script type="text/javascript" src="__PUBLIC__/Home/js/common_select.js" charset="utf-8"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/ajaxfileupload.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/jquery.Jcrop.js"></script>
<link href="__PUBLIC__/Home/css/jquery.Jcrop.min.css" rel="stylesheet" type="text/css" id="cssfile2">
<script type="text/javascript">

</script>
    </div>
  </div>
</div>
<script type="text/javascript">
	function uploadImage(id,srcid) {
		var data = new FormData();
		$.each($('#'+id)[0].files, function(i, file) {
			data.append('upload_file', file);
		});
		 data.append('store', 1);

		$.ajax({
			type: "POST",
			url: "/store/pic_upload",
			data: data,
			contentType:'multipart/form-data',
			cache: false,
			contentType: false,    //不可缺
			processData: false,    //不可缺
			success: function(data) {
				
				var html = '';
				    html +='<img src="'+data.info+'" data-ke-src="'+data.info+'">';
					
				if(srcid == 'store_label'){	
					//alert(id);
					$('input[name="store_label"]').val(data.info);					
					$("#store_label p").html(html);
				} else if (srcid=='store_banner')  {				
					$('input[name="store_banner"]').val(data.info);
					$("#store_banner p").html(html);						
				} else if (srcid=='store_avatar')  {				
					$('input[name="store_avatar"]').val(data.info);
					$("#store_avatar").html(html);						
				}

			}
		});
	}
	$("#storeLablePic").change(function(){		
		//上传图片
		uploadImage('storeLablePic','store_label');
	});
						
	$("#storeBannerPic").change(function(){
		//上传图片
		uploadImage('storeBannerPic','store_banner');
	});
	$("#headr_pic").change(function(){
		//上传图片
		uploadImage('headr_pic','store_avatar');
	});
	
	$("input[name='set_hash']").each(function(){
		var vals = $(this).val(_getRandomString(32));
		//alert(_getRandomString(32));
		
	});
	
	// 获取长度为len的随机字符串  
	function _getRandomString(len) {  
		len = len || 32;  
		var $chars = 'ABCDEFGHJKMNPQRS2345678TWXYZabcdefhijkmnprstwxyz2345678'; // 默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1  
		var maxPos = $chars.length;  
		var pwd = '';  
		for (i = 0; i < len; i++) {  
			pwd += $chars.charAt(Math.floor(Math.random() * maxPos));  
		}  
		return pwd;  
	}	
	
</script>
<script type="text/javascript">
 
</script>
			<!--底部-->

<include file="SpStore:footer" />
	</body>

</html>